package com.dehui.traders.ui.register;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Html;
import android.text.Spanned;

import com.dehui.traders.BR;
import com.dehui.traders.R;
import com.dehui.traders.databinding.ActivityRegisterBinding;
import com.dehui.traders.ui.base.AppActvity;


public class RegisterActivity extends AppActvity<ActivityRegisterBinding,RegisterViewModel> {

    private RegisterViewModel viewModel;

    public static void start(Context context){
        context.startActivity(new Intent(context,RegisterActivity.class));
    }

    @Override
    public int initContentView() {
        return R.layout.activity_register;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public RegisterViewModel initViewModel() {
        viewModel = new RegisterViewModel(this);
        viewModel.initActivity(this);
        return viewModel;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initToolbarValue(R.string.register);
        initUI();
    }

    private void initUI() {
        Spanned agreement = Html.fromHtml("阅读并接受<font color=#0000ff>《V操盘用户协议》");
        binding.tvAgreementRegister.setText(agreement);
    }

    public void startButton() {
        binding.cdbRegisterTimer.start();
    }
}
